<?php echo $this->doctype(); ?>

<html>
    <head>

        <!-- Headerinformationen aus dem Bootstraper _iniHeader und aus der Application.ini laden -->
        <?php
        $this->headLink()
                ->headLink(array('rel' => 'icon', 'href' => '/resources/images/favicon.ico', 'type' => 'image/x-icon'), 'PREPEND');
        ?>
        <?php echo $this->headTitle(); ?>

        <?php echo $this->headMeta(); ?>

        <?php echo $this->headLink(); ?>

        <?php echo $this->headScript(); ?>

        <?php echo $this->headStyle(); ?>
        <?php echo $this->jQuery(); ?>

    </head>

    <body<?php
        if ($this->documentClasses) {
            echo ' class="' . implode(' ', $this->documentClasses) . '"';
        }
        ?>>
        <div id="backend">
            <div id="headmenu">
                <ul>
                    <?php if (Zend_Auth::getInstance()->hasIdentity()) { ?>
                        <li><a class = "login" href = "/backdoor/content"><?php echo $this->translate("Create Content"); ?>
                            </a></li>
                        <li><a class = "login" href = "/backdoor/user"><?php echo $this->translate("User Management");
                    ?></a></li>
                        
                <li class="user"><?php echo 'Eingeloggt als:<b> ' . Zend_Auth::getInstance()->getIdentity()->username . '</b>'; ?></li>
                        <li class="logout"><a  href="/backdoor/index/logout">Abmelden</a></li></ul> <?
                    
                } ?>

            </div>
            <div id="panel">
                <?php
                if ($this->statusMessages) {
                    ?>
                    <div class="messages status">
                        <ul>
                            <?php
                            foreach ($this->statusMessages as $message) {
                                ?>
                                <li><?php echo $message; ?>
                                    <?php
                                }
                                ?>
                        </ul>
                    </div>
                    <?php
                }
                if ($this->errorMessages) {
                    ?>
                    <div class="messages error">
                        <p><?php
                echo count($this->errorMessages) ? 'Folgender Fehler ist' : 'Folgende Fehler sind';
                    ?> aufgetreten:</p>
                        <ul>
                            <?php
                            foreach ($this->errorMessages as $message) {
                                ?>
                                <li><?php echo $message; ?>
                                    <?php
                                }
                                ?>
                        </ul>
                    </div>
                    <?php
                }
                ?>
                <?php echo $this->layout()->content ?>
            </div>
        </div>
    


</body>